﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Rodunu.Business.Models.Movies;

namespace Rodunu.Clients.WPF.Collection.Forms
{
    /// <summary>
    /// Interaction logic for CastForm.xaml
    /// </summary>
    public partial class CastForm : UserControl
    {
        public Title Movie
        {
            get
            {
                return (Title)ActorsListView.DataContext;
            }
            set
            {
                if (value.Cast.Count > 0)
                    ActorsListView.Visibility = System.Windows.Visibility.Visible;
                else
                    ActorsListView.Visibility = System.Windows.Visibility.Collapsed;
                ActorsListView.DataContext = value;
            }
        }

        public CastForm()
        {
            InitializeComponent();
        }
    }
}
